<div id="element-box">
	<div class="m">
		<div class="subNav">
			<ul>
				<li>
					<div>
						<a title="" href="/admin/user/index"><?php echo $this->translate('admin_user_index_tab')?></a>
					</div>
				</li>
				<li class="active">
					<div>
						<a title="" href="/admin/user/add"><?php echo $this->translate('admin_user_add_tab')?></a>						
					</div>
				</li>				
			</ul>
		</div>
		<?php echo $this->message ?>
		<div class="head-title">
			<h3>
				<span>Quản lý user / Thêm sửa user</span>
			</h3>			
		</div>
		<form class="form-validate" id="item-form" name="adminForm"	method="post" action="">
			<div class="width-100 fltlft">
				<fieldset class="adminform">
					<legend><?php echo $this->translate('admin_form_detail')?></legend>
					<ul class="adminformlist">
						<li>
							<label title="" class="hasTip required" for="jform_name"><?php echo $this->translate('admin_form_fullname')?></label> 
							<input type="text" size="40" style="width:200px" class="inputbox required"	
							value="<?php echo (isset($this->detail['fullname'])) ? $this->detail['fullname'] :''  ?>" name="jform[fullname]">
						</li>
						<li>
							<label title="" class="hasTip" for="jform_email"><?php echo $this->translate('admin_form_email')?></label> 
							<input type="text" size="40" style="width:200px" class="inputbox required" 
							value="<?php echo (isset($this->detail['email'])) ? $this->detail['email'] :''  ?>" name="jform[email]">
						</li>
						<li>
							<label title="" class="hasTip" for="jform_username"><?php echo $this->translate('admin_form_username')?></label> 
							<input type="text" size="40" style="width:200px" class="inputbox required" 
							value="<?php echo (isset($this->detail['username'])) ? $this->detail['username'] :''  ?>" name="jform[username]">
						</li>
						<li>
							<label title="" class="hasTip" for="jform_password"><?php echo $this->translate('admin_form_password')?></label> 
							<input type="password" size="40" style="width:200px" class="inputbox required" value="" name="jform[password]">
						</li>						
						<li>
							<label title="" class="hasTip" for="jform_phone"><?php echo $this->translate('admin_form_phone')?></label> 
							<input type="text" size="40" style="width:200px" class="inputbox required" 
							value="<?php echo (isset($this->detail['phone'])) ? $this->detail['phone'] :''  ?>" name="jform[phone]">
						</li>
						<li>
							<label title="" class="hasTip" for="jform_role"><?php echo $this->translate('admin_table_role')?></label> 
							<select class="inputbox" name="jform[role]">
								<option value="0"><?php echo $this->translate('admin_form_select_role')?></option>	
								<?php 
								foreach ($this->arrRole as $item) {	
									$selected = '';
									if ($item['role_id'] == $this->detail['role_id']) $selected = 'selected="selected"';	
									echo '<option '.$selected.' value="'.$item['role_id'].'">'. $item['role_name'] .'</option>';		
								 } 
								 ?>						
							</select>
					   	</li>
						<li>
							<label title="" class="hasTip" for="jform_published"><?php echo $this->translate('admin_form_status')?></label> 
							<select size="1" class="inputbox" name="jform[active]">
								<option <?php echo (isset($this->detail['active']) && $this->detail['active'] == 1) ? 'selected="selected"': ''?>  
								value="1"><?php echo $this->translate('admin_form_active')?></option>
								<option <?php echo (isset($this->detail['active']) && $this->detail['active'] == 0) ? 'selected="selected"': ''?> 
								value="0"><?php echo $this->translate('admin_form_deactive')?></option>								
							</select>
					   	</li>		
					</ul>	
					<div class="clr"></div>				
					<div class="toggle-editor">
						<div class="buttonList">
							<button value="save" title="<?php echo $this->translate('admin_form_save')?>" type="submit" name="save"><?php echo $this->translate('admin_form_save')?></button>
							<button value="cancel" title="<?php echo $this->translate('admin_form_cancel')?>" type="submit" name="btnCancel"><?php echo $this->translate('admin_form_cancel')?></button>
						</div>
					</div>
				</fieldset>
			</div>
			<div class="clr"></div>
			<input type="hidden" name="jform[id]" value="<?php echo isset($this->detail['id']) ? $this->detail['id']:''?>" />		
			<input type="hidden" name="jform[token]" value="<?php echo base64_encode(session_id())?>" />		
		</form>
		<div class="clr"></div>
	</div>
</div>
